package com.tanhua.server.enums;

public enum LevelEnum {
    PRIMARY("1", "初级"),
    MIDDLE("2", "中级"),
    SENIOR("3","高级")
    ;

    private String value;
    private String name;

    LevelEnum(String value, String name) {
        this.value = value;
        this.name = name;
    }

    public String getValue() {
        return value;
    }

    public String getName() {
        return name;
    }


    public static String getValueByName(String name) {
        String value = "1";
        for (LevelEnum e : values()) {
            if (e.name.equals(name)) {
                value = e.value;
            }
        }
        return value;
    }
}
